package com.ruoyi.swla2.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName("dm_warn")
public class WarnHistory extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 平台自增主键
     */
    @TableId(value = "ID",type = IdType.INPUT)
    private Long ID;

    /**
     * 租户ID
     */
    @TableField("tenant_id")
    @Excel(name = "租户ID")
    private String tenantId;

    /**
     * 报警对象类型，对应自定义字典表WarnTargetType
     */
    @TableField("TargetType")
    @Excel(name = "报警对象类型，对应自定义字典表WarnTargetType")
    private Long TargetType;

    /**
     * 报警对象ID
     */
    @TableField("TargetID")
    @Excel(name = "报警对象ID")
    private String TargetID;

//    /**
//     * 报警对象名称
//     */
//    @Excel(name = "报警对象名称")
//    private String TargetName;

    /**
     * 报警状态，0未确认，1已确认
     */
    @TableField("WarnStatus")
    @Excel(name = "报警状态，0未确认，1已确认")
    private Long WarnStatus;

    /**
     * 处理状态，0未处理，1已处理
     */
    @TableField("HandleStatus")
    @Excel(name = "处理状态，0未处理，1已处理")
    private Long HandleStatus;

    /**
     * 报警参数，对应自定义字典表WarnParamType
     */
    @TableField("WarnParamType")
    @Excel(name = "报警参数，对应自定义字典表WarnParamType")
    private Long WarnParamType;

    /**
     * 报警类型，1超上限，2超下限，3阈值，4累计，5连续
     */
    @TableField("WarnType")
    @Excel(name = "报警类型，1超上限，2超下限，3阈值，4累计，5连续")
    private Long WarnType;

    /**
     * 开始时间
     */
    @TableField("StartTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date StartTime;

    /**
     * 最近报警时间
     */
    @TableField("RecentlyWartTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "最近报警时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date RecentlyWartTime;

    /**
     * 数据冻结时间
     */
    @TableField("freezetime")
    @Excel(name = "数据冻结时间")
    private String freezetime;

    /**
     * 报警值-实际数值
     */
    @TableField("WarnValue")
    @Excel(name = "报警值-实际数值")
    private BigDecimal WarnValue;

    /**
     * 参考值-超上限则上限值，超下限则下限值
     */
    @TableField("ReferenceValue")
    @Excel(name = "参考值-超上限则上限值，超下限则下限值")
    private BigDecimal ReferenceValue;

    /**
     * 差值
     */
    @TableField("Value")
    @Excel(name = "差值")
    private BigDecimal Value;

    /**
     * 确认人
     */
    @TableField("ConfirmedBy")
    @Excel(name = "确认人")
    private String ConfirmedBy;

    /**
     * 派单状态
     */
    @TableField("pd")
    @Excel(name = "派单状态")
    private String pd;

    @TableField(exist = false)
    private String queryStartDate;

    @TableField(exist = false)
    private String queryEndDate;
}
